package cn.itcast.scala

import scala.collection.mutable.ArrayBuffer
/*
	@Date:2022.02.27
	@Author:dong hui
 */
object ArrayDemo {
	def main(args:Array[String]): Unit = {
		val arr1 = new Array[Int](8)
		println(arr1)

		val ab = ArrayBuffer[Int]()
		ab += 1
		println(ab)

		ab += (2,3,4,5)
		println(ab)

		ab ++= Array(6,7)
		println(ab)

		ab ++= ArrayBuffer(8,9)
		println(ab)

		ab.insert(0,-1)
		println(ab)

		ab.remove(0)
		println(ab)
  }
}
